package com.p2p.controller.contentManagement;


import com.p2p.common.R;
import com.p2p.entity.VersionManage;
import io.swagger.annotations.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/versionManage")
@Api(value = "版本管理",tags = "版本管理理接口API")
public class VersionManageController {

    @RequestMapping(value = "/findAllVersionManage",method = RequestMethod.GET)
    @ApiOperation(value = "版本管理",notes = "显示版本管理",httpMethod = "GET", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="登录成功"),
            @ApiResponse(code=400,message="代表参数格式不对"),
            @ApiResponse(code=404,message="代表找不到此请求"),
            @ApiResponse(code=500,message="代表后端代码出现异常"),
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数默认第一页",paramType = "query",dataType = "String",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页显示记录数",paramType = "query",dataType = "String",required = true)
    })
    @ResponseBody
    public R findAllVersionManage(Integer currentPage,Integer pageSize){
        return null;
    }

    @RequestMapping(value = "/findVersionById",method = RequestMethod.POST)
    @ApiOperation(value = "返回该版本管理",notes = "返回该版本管理",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="登录成功"),
            @ApiResponse(code=400,message="代表参数格式不对"),
            @ApiResponse(code=404,message="代表找不到此请求"),
            @ApiResponse(code=500,message="代表后端代码出现异常"),
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "版本管理id",paramType = "query",dataType = "String",required = true)
    })
    @ResponseBody
    public R findVersionById(Integer id){
        return null;
    }

    @RequestMapping(value = "/findVersionByStatus",method = RequestMethod.GET)
    @ApiOperation(value = "返回该版本管理",notes = "返回该版本管理",httpMethod = "GET", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="登录成功"),
            @ApiResponse(code=400,message="代表参数格式不对"),
            @ApiResponse(code=404,message="代表找不到此请求"),
            @ApiResponse(code=500,message="代表后端代码出现异常"),
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "status",value = "状态",paramType = "query",dataType = "String",required = true)
    })
    @ResponseBody
    public R findVersionByStatus(Byte status){

        return null;
    }

    @RequestMapping(value = "/addVersion",method = RequestMethod.POST)
    @ApiOperation(value = "添加版本管理",notes = "添加版本管理",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="登录成功"),
            @ApiResponse(code=400,message="代表参数格式不对"),
            @ApiResponse(code=404,message="代表找不到此请求"),
            @ApiResponse(code=500,message="代表后端代码出现异常"),
    })
    @ResponseBody
    public R addVersion(@RequestBody @ApiParam(name = "versionManage",value = "版本实体",required = true)VersionManage versionManage){
        return null;
    }

    @RequestMapping(value = "/deleteVersionById",method = RequestMethod.POST)
    @ApiOperation(value = "删除一条版本管理",notes = "删除一条版本管理",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="登录成功"),
            @ApiResponse(code=400,message="代表参数格式不对"),
            @ApiResponse(code=404,message="代表找不到此请求"),
            @ApiResponse(code=500,message="代表后端代码出现异常"),
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "版本管理id",paramType = "query",dataType = "String",required = true)
    })
    @ResponseBody
    public R deleteVersionById(Integer id){
        return null;
    }

    @RequestMapping(value = "/updateVersion",method = RequestMethod.POST)
    @ApiOperation(value = "修改版本管理",notes = "修改版本管理",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="登录成功"),
            @ApiResponse(code=400,message="代表参数格式不对"),
            @ApiResponse(code=404,message="代表找不到此请求"),
            @ApiResponse(code=500,message="代表后端代码出现异常"),
    })
    @ResponseBody
    public R updateVersion(@RequestBody @ApiParam(name = "versionManage",value = "版本实体",required = true)VersionManage versionManage){
        return null;
    }
}
